package com.situ.mall.admin.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer;
import lombok.Data;

import java.time.LocalDateTime;

/**
 * @author yangkx
 * @create 2023-09-09-9:42
 */
@Data
public class UserVO {

    private Integer id;

    private String username;

    private Integer typeId;

    private String typeName;

    private String password;

    private String phoneNumber;

    //序列化时间类（把创建时间转化为json字符串）
    @JsonSerialize(using = LocalDateTimeSerializer.class)
    //并转化为如下格式
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime;//创建时间

    private String status;//状态 0正常 -1停用/禁用 1已被删除

    private String avatar;//图片地址
}
